<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>更多</title>
    <link rel="stylesheet" type="text/css" href="./css/api.css" />
    <link rel="stylesheet" type="text/css" href="./css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./css/font-awesome.min.css" />
    <link rel="stylesheet" type="text/css" href="./css/style.css" />
    <script type="text/javascript" src="./script/api.js"></script>
    <script type="text/javascript" src="./script/aui-tab.js" ></script>
    <link rel="stylesheet" type="text/css" href="./css/aui-slide.css" />
    <script type="text/javascript" src="./script/aui-slide.js"></script>
    <script type="text/javascript" src="./script/jquery-3.2.0.js"></script>
    <script type="text/javascript" src="./script/base.js"></script>

    <script type="text/javascript">
        apiready = function(){
          var header = document.querySelector('#topbar');
          $api.fixStatusBar(header);
      }
      function closeWin(){
        api.closeWin({
        });
    };
</script>
</head>
<body>
   <!-- 头部 -->
   <header class="aui-bar aui-bar-nav" id="topbar">更多</header>
   <div class="more-list-m">
    <ul class="aui-list aui-list-in">
        <li class="aui-list-item ios" tapmode onclick="news_list()">
            <div class="aui-list-item-label-icon">
                <i class="fa fa-file-text-o"></i>
            </div>
            <div class="aui-list-item-inner aui-list-item-arrow">
                <div class="aui-list-item-title">资讯中心</div>
            </div>
        </li>
        <li class="aui-list-item ios">
            <div class="aui-list-item-label-icon">
                <i class="fa fa-pencil-square-o"></i>
            </div>
            <div class="aui-list-item-inner aui-list-item-arrow" tapmode onclick="guestbook()">
                <div class="aui-list-item-title">意见反馈</div>
            </div>
        </li>
        <li class="aui-list-item ios">
            <div class="aui-list-item-label-icon">
                <i class="fa fa-shield"></i>
            </div>
            <div class="aui-list-item-inner aui-list-item-arrow" tapmode onclick="about_us()">
                <div class="aui-list-item-title">关于金可贷</div>
            </div>
        </li>
        <li class="aui-list-item ios" tapmode onclick="ques_list()">
            <div class="aui-list-item-label-icon">
                <i class="fa fa-question"></i>
            </div>
            <div class="aui-list-item-inner aui-list-item-arrow">
                <div class="aui-list-item-title">常见问题</div>
            </div>
        </li>
        <li class="aui-list-item ios" tapmode onclick="go_calculator()">
            <div class="aui-list-item-label-icon">
                <i class="fa fa-calculator"></i>
            </div>
            <div class="aui-list-item-inner aui-list-item-arrow">
                <div class="aui-list-item-title">收益计算器</div>
            </div>
        </li>
        <li class="aui-list-item ios unios" tapmode onclick="call_service()">
            <div class="aui-list-item-label-icon">
                <i class="fa fa-volume-control-phone"></i>
            </div>
            <div class="aui-list-item-inner">
                <div class="aui-list-item-title">客服热线</div>
                <div class="aui-list-item-right">400-0454-017</div>
            </div>
        </li>
    </ul>
</div>
<div class="more-list-d" onclick="logout();" id="btnForLogin" style="display: none;">退出登录</div>
</body>
<script type="text/javascript">
    apiready = function(){
        btnForLogin();

        $(".ios").hide();

        api.ajax({
            url: 'http://www.big-wealth.com/index.php?ctl=app_deal&act=config',
            method: 'post',
        },function(ret, err){
            if (ret) {
                // alert( JSON.stringify( ret ) );
                var isHide = ret.status;
                if (api.systemType != 'ios' || isHide == 1) {
                // delay = 300;
                $(".ios").show();
            } else {
                $(".unios").show();
            }
        } else {
                // alert( JSON.stringify( err ) );
            }
        });
    }

    // 如若已登录,则不显示登录按钮
    function btnForLogin(){
        var userid = $api.getStorage('userid');
        if (userid) {
            var btnForLogin = $api.byId('btnForLogin');
            $api.removeAttr(btnForLogin, 'style');
        }
    }
    //关于我们
    function guestbook() {
        var delay = 0;
        if(api.systemType != 'ios'){
            // delay = 300;
        }
        api.openWin({
            name: 'guestbook',
            url: './guestbook.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
        });
    }

//关于我们
function about_us() {
    var delay = 0;
    if(api.systemType != 'ios'){
        // delay = 300;
    }
    api.openWin({
        name: 'about_us',
        url: './aboutus_list.html',
        bounces: false,
        delay: delay,
        slidBackEnabled: true,
        vScrollBarEnabled: false,

    });

}


    // 修改登录密码
    function edit_password(){
        var delay = 0;
        if(api.systemType != 'ios'){
            // delay = 300;
        }
        api.openWin({
            name: 'edit_password',
            url: './edit-password.html',
            bounces:false,
            delay: delay,
            slidBackEnabled:true,
            vScrollBarEnabled:false,
            progress:{
                type:"page"
            }
        });
    };
    // 资讯中心
    function news_list(){
        var delay = 0;
        if(api.systemType != 'ios'){
            // delay = 300;
        }
        api.openWin({
            name: 'news_list',
            url: './news-list.html',
            bounces:false,
            delay: delay,
            slidBackEnabled:true,
            vScrollBarEnabled:false,
            progress:{
                type:"page"
            }
        });
    };
    // 常见问题
    function ques_list(){
        var delay = 0;
        if(api.systemType != 'ios'){
            // delay = 300;
        }
        api.openWin({
            name: 'ques_list',
            url: './ques-list.html',
            bounces:false,
            delay: delay,
            slidBackEnabled:true,
            vScrollBarEnabled:false,
            progress:{
                type:"page"
            }
        });
    };

    // 收益计算器
    function go_calculator() {
        var delay = 0;
        if(api.systemType != 'ios'){
            // delay = 300;
        }
        api.openWin({
            name: 'calculator',
            url: './calculator.html',
            pageParam: {

            }
        });
    }

    // 退出登录
    function logout(){

        api.confirm({
            title: '提示',
            msg: '是否登出?',
            buttons: ['确定', '取消']
        }, function(ret, err){
            if( ret ){
                if (ret.buttonIndex == 1) {
                   $api.setStorage('userid', '');
                 // 提示退出成功
                 api.toast({
                   msg: '退出成功!',
                   duration: 1500,
                   location: 'middle'
               });
                 api.setFrameGroupIndex({
                    name: 'nav',
                    index: 2,
                    reload: true,
                });
                 var setSele = 'changeSelect();';
                 api.execScript({
                    name: 'home',
                    script: setSele,
                });
             }
         }else{
         }
     });
    }

    // 拨打服务电话
    function call_service() {
        api.call({
            type: 'tel_prompt',
            number: '4000454017'
        });

    }
</script>
</html>
